home *** CD-ROM | disk | FTP | other *** search
- DrawStrip
-
- A utility for preparing key strips as !Draw files
-
- By C.T.Stretch
-
- Files included :-
-
- Path File Type Purpose
-
- BasKeys text Example file with key definitions
- for the basic editor
- ReadMe text this file
- !DrawStrip.!RunImage BASIC the main program
- !DrawStrip.!Run Obey runs the program
- !DrawStrip.!Sprites sprite one sprite
-
-
- DrawStrip takes a text file that includes a list of text to put in each
- key position and produces a !Draw file keystrip that can be examined with
- !Draw or printed with a RISC OS printer driver (!PrinterDM or !PrinterPS) .
-
- To try DrawStrip with the example text file BasKeys :-
-
- 1) Load a printer driver and set it for your printer .
- 2) Ensure that the filer has seen !System , !Draw and !Fonts.
- e.g. display a filer directory of the root directory of
- Application disk 1
- 3) Check you have some font space configured .
- 4) Double click on the !DrawStrip icon , this should install DrawStrip on
- the iconbar .
- 5) Drag the BasKeys icon onto the DrawStrip icon on the iconbar .
- 6) After a few seconds a "Save as:" window should appear
- either a) change the name if desired and drag to a filer window
- or b) click on <OK> to accept the path name as given
- or c) drag onto a !Draw icon on the iconbar
- or d) drag into an open !Draw window
- or e) drag to the printer driver icon .
- After a) or b) you can drag the filer icon as c),d) or e) .
-
-
- Preparing a text file of key definitions
-
- These files can be prepared with !Edit . Examine BasKeys with !Edit as an
- example . Each line of the file starts with a keyword in lower case text
- followed by a number <n> or string <s> . The file must have type FFF (text).
- Numbers are positive decimal integers . Strings are any printable
- characters up to the end of the line .
-
- Keywords
- rem <s> ignored
- row <n> The following key definition apply to row n
- range 1 (bottom) - 8
- f<n> <s> sets the text for key n in the last chosen row to s
- range n 1 - 12
- s - at most 80 chars (much fewer in practice)
- no space can precede the <n>
- a space must follow the <n>
- right <s>
- left <s> sets the text to appear at the side of the boxes
-
- The remaining keywords should appear at most once each in a file . If two
- appear only the last is used . They need not appear at all , when the
- default is used .
-
- title <s> sets the title of the strip to <s>
- height <n> height of each box in 1/46080 inch
- default 1/3 inch
- range 0 - 46080
- tpoint <n> set the title text size to n points
- default 20
- range 2-40
- kpoint <n>
- spoint <n> set the maximum point size for the (k)ey or (s)ide text
- default 12
- range 2-40
- tfont <s>
- kfont <s>
- sfont <s> set the font for (t)itle,(k)eys or (s)ide
- default Trinity.Medium
- the fonts must reside in <Font$Path>
- lwidth n set the width of the lines in the boxes in 1/46080 inch
- default 320
- range 0 - 4608
- 0 gives lines of minimum thickness
-
- The number of rows is taken from the largest row <n> in the file .
- So for example a file containing just "row 3" will produce an empty keystrip of 3 rows 1/3 inch high with line width 320/46080 inch .
- Blank lines are permitted in a file . Any other lines not beginning with a keyword produce an error .
- kpoint and spoint set a largest point size , Drawstrip steps down the
- pointsize by twos until the text will fit in the avaliable space . If you
- use a large kpoint a large variety of text sizes will appear that looks
- rather untidy , although some keys will be easier to read .
-
- Errors and difficulties
-
- System resources cannot be found
- the filer has not seen !System
- - [ cancel ] then open a directory containing !System
- Fonts cannot be found
- the filer has not seen !Fonts
- - [ cancel ] then open a directory containing !Fonts
- Bad text error - followed by line
- your text input file is incorrect at this line
- - [ OK ] ignore line and continue
- - [ cancel ] abandon attempt
- Printer driver needed .....
- DrawStrip reads the papersize from the printer module
- - [ cancel ] then load a printer driver and try again
- The strip is truncated at the end(s)
- Your paper is too short
- - use only 'right' or 'left' not both or
- load into draw , copy and move one up and one down
- then print and glue the truncated pieces together
- Your printer driver has large margins
- - see printer drivers below
- The text appears 'hairy'
- your printer driver has too large a block for anti-aliasing
- - see printer drivers below
- The program takes a long time and many disk accesses
- you have not configured enough fontsize
- - see Fontsize below
-
-
- Resources
-
- Using the program will need
- !DrawStrip , !Draw , !Edit to produce input
- !System to define <Wimp$Scrap> for the direct transfer system
- !Fonts to set <Font$Prefix> and provide the fonts
- !PrinterDM or other driver
- If you have a single floppy you could copy these onto one disk and save a
- lot of disk swapping
-
-
- Fontsize
-
- If you normally have the machine configured with no or little fontsize you
- may wish the !Run file to allocate it for you . Examine !Run and remove the
- comment bars ' | ' from the two lines . You will need to copy the MemAlloc
- module into !System.Modules . It can be found in !Lander on Application disk
- 2 .
-
- Printer Drivers
-
- The quality of the output from DrawStrip or other !Draw files depends on
- having your printer driver set up correctly . Presumably if you have a laser
- printer this should not be a problem , although you may still have to set up
- the margins . The following may help if you are using PrinterDM .
- My printer is an ancient MX80III . The only resolution supplied by
- PrinterDM that it supported was 60x72 dpi which is useless for Draw files .
- The printer also supports 120x72 and 120x216 and it turned out to be quite
- easy to set the printer driver to these . The following observations are
- purely experimental but should not do too much harm .
- If you look in the directory !PrinterDM you will find a text file PrData .
- Make sure you have another copy of this and then load it into !Edit . It
- consists of three parts
- Defaults : this sets the values for certain variables if they are not
- changed in the next part
- Real printer definitions : this sets the values for a list of printers
- Configured options : stores your configured options
- To set up a new real printer definition make a copy of the nearest one to
- it at the end of the list and change the name and the number to the next
- unused number , then change or add variable definitions . Most of the
- variable names are obvious .
- The pxres_halftone and pyres_halftone variables set the size of a box that
- is partially filled to simulate different shades . If this is too big
- anti-aliased fonts give rise to 'hairy' letters , as the shading pixels may
- not be on the right side of the box . Try using pxres and pyres / 1 or 2 . (Putting both to /1 seems not to work?)
- The paper size and margins are set in the defaults , but there is nothing
- to stop you changing them in your definition . If you are using fanfold
- paper you can set page_bottom to 0 , page_top to 841920 , then a DrawStrip
- strip will fit completely on A4 paper . You should probably not set
- page_right to more than 576000 on a 8inch carriage printer . The margins are
- read by !Draw and used to set up the grey areas that appear when you do
- 'show paper limits' if you have a printer driver loaded .
- Of course you can keep other printer definitions for your printer in the
- same file with different settings . It may be worth deleting printer
- definitions that you will never use as it may speed up the loading of
- PrinterDM . Check that the printer in configured options is set to a number
- that still exists .
-
- Philosophy
-
- This program started as a small exercise to write a !Draw file that did
- something (slightly) useful . It just grew in the way wimp programs seem to
- .
- Acorn has produced an excellent idea in the PrinterDriver system . It
- means authors can write graphical output for their printer safe(?) in the
- knowledge that it will produce output on the lowest dot-matrix printer , the
- most superior Postscript laser and even(?) a plotter . Writing output
- directly to the printer driver looks like hard work , and for most purposes
- producing a !Draw file should be easier , and has other advantages such as
- allowing the user to review or alter the work before printing .
- So , why not write your programs to produce output as !Draw files , and
- distribute any documents that need graphics as !Draw files
-
- Contacts
-
- Any comments , bug reports etc. gratefully received by
- Chris Stretch on
- Archive BBS No 62
- or JANET CBTP13@UK.AC.ULSTER
-
-